home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "MlStringModule"
- Option Explicit
-
- Public ml_CurrentLanguageId As Long
- Public Const ml_LanguageCount As Long = 0
-
- Public Function ml_string(ByVal StringID As Long, Optional ByVal Text As String = "") As String
- ml_string = Text
- End Function
-
- Public Function ml_LanguageName(ByVal LangIndex As Long) As String
- ml_LanguageName = "Invalid Language Index"
- End Function
-
- Public Sub ml_ChangeLanguage(ByVal LanguageID As Long, ByVal Language As String)
-
- 'If an application uses UserControls or Class Modules compiled as separate
- 'projects, then these projects may (a) not support the same languages or
- '(b) not use the same ID number for a given language.
- 'If the language is changed at run time, an event can be fired via the
- 'MLSupport object, and received in all projects.
- 'This function checks whether the ID and Language name match before accepting
- 'the language change. If they do not match, then it searches for language
- 'using the language name not the ID. If the language is not found, then the
- 'language is not changed.
-
- 'Check whether the LanguageID and the Language match in this project.
- 'Use StrComp() for case insensitive comparison
- If StrComp(ml_LanguageName(LanguageID), Language, vbTextCompare) = 0 Then
- ml_CurrentLanguageId = LanguageID
- Else
- 'LanguageID may be different in this project.
- 'Search for the language string.
- For LanguageID = 0 To ml_LanguageCount - 1
- If StrComp(ml_LanguageName(LanguageID), Language, vbTextCompare) = 0 Then
- ml_CurrentLanguageId = LanguageID
- Exit For
- End If
- Next
- End If
-
- End Sub
-
-
-